﻿namespace DesignModeConsole.设计原则.LiskovSubstitutionPrinciple
{
    internal interface IEmployee2
    {
        /// <summary>
        /// 计算年终奖
        /// </summary>
        /// <returns></returns>
        public decimal CalculateBonus();
    }

    public abstract class Employee2
    {
        public string Name { get; set; }
    }

    /// <summary>
    /// 永久雇员
    /// </summary>
    public class PermanentEmployee2 : Employee2, IEmployee2
    {
        public decimal CalculateBonus()
        {
            return 80000;
        }
    }

    /// <summary>
    /// 合同工
    /// </summary>
    public class ContractEmployee2 : Employee2, IEmployee2
    {
        public decimal CalculateBonus()
        {
            return 2000;
        }
    }

    /// <summary>
    /// 临时工
    /// </summary>
    public class TemporaryEmployee2 : Employee2
    {
    }
}